import Home from '../components/home/index.vue'
import Detail from '../components/detail/index.vue'
import TabBar from '../components/tabbar/index.vue'
import {createRouter,createWebHashHistory} from 'vue-router'


const routes = [
  { 
  	path: '/tab', 
  	component: TabBar,
  	children: [
      { path: '/tab/home', component: Home },
    ],
  },
  { 
  	path: '/detail', 
  	component: Detail,
  	props:true
  },


]



const router = createRouter({
  // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: createWebHashHistory(),
  routes, // `routes: routes` 的缩写
})

export default router